package pl.krzosekm.vehicleregister.model;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;


@Entity
@Table(name="vehicle")
public class Vehicle extends PersistentObject {
    
    private static final long serialVersionUID = 7723097304074471757L;

    @Id
    @Column(name="vin", unique=true, nullable=false)
    private String vin;
    
    @Column(name="register_no", nullable=false)
    private String registerNo;
    
    @Column(name="brand", nullable=false)
    private String brand;
    
    @Column(name="model", nullable=false)
    private String model;
    
    @Column(name="year_of_man", nullable=false)
    private Date yearOfMan;
    
    @Column(name="mileage", nullable=false)
    private Integer mileage;
    
    
    
    
    
    public Vehicle() {
	super();
    }

    public Vehicle(String vin, String registerNo, String brand, String model,
	    Date yearOfMan, Integer mileage) {
	super();
	this.vin = vin;
	this.registerNo = registerNo;
	this.brand = brand;
	this.model = model;
	this.yearOfMan = yearOfMan;
	this.mileage = mileage;
    }

    public void setVin(String vin) {
	this.vin = vin;
    }

    public String getVin() {
	return vin;
    }

    public String getRegisterNo() {
        return registerNo;
    }

    public void setRegisterNo(String registerNo) {
        this.registerNo = registerNo;
    }

    public String getBrand() {
        return brand;
    }

    public void setBrand(String brand) {
        this.brand = brand;
    }

    public String getModel() {
        return model;
    }

    public void setModel(String model) {
        this.model = model;
    }

    public Date getYearOfMan() {
        return yearOfMan;
    }

    public void setYearOfMan(Date yearOfMan) {
        this.yearOfMan = yearOfMan;
    }

    public Integer getMileage() {
        return mileage;
    }

    public void setMileage(Integer mileage) {
        this.mileage = mileage;
    }

    

}
